package cn.crce.cloud9.comp;

import javax.swing.*;
import java.awt.*;
import javax.swing.*;

/**
 * @author OnCloud9
 * @description
 * @project NRCE-TEST
 * @date 2022年09月12日 下午 10:32
 */
public class Case5 {
    static final int WIDTH=300;
    static final int HEIGHT=200;
    public static void main(String[] args){
        //*********Found**********
        JFrame jf= new JFrame();
        jf.setSize(WIDTH,HEIGHT);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //*********Found**********
        jf.setTitle ("股票分析系统");
        Toolkit kit= Toolkit.getDefaultToolkit();
        Dimension screenSize=kit.getScreenSize();
        int width=screenSize.width;
        int height=screenSize.height;
        int x=(width-WIDTH)/2;
        int y=(height-HEIGHT)/2;
        jf.setLocation (x,y);
        //*********Found**********
        jf.setVisible(true);
    }
}
